<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>草地分析管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/analysis/grassAnalysis/">草地分析列表</a></li>
	<%-- 	<shiro:hasPermission name="analysis:grassAnalysis:edit"><li><a href="${ctx}/analysis/grassAnalysis/form">草地分析添加</a></li></shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="grassAnalysis" action="${ctx}/analysis/grassAnalysis/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>草场：</label>
				<form:input path="grass.id" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>年：</label>
				<form:input path="year" htmlEscape="false" maxlength="11" class="input-medium"/>
			</li>
			<li><label>月：</label>
				<form:input path="month" htmlEscape="false" maxlength="11" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>草场</th>
				<th>本月产量(公斤/亩)</th>
				<th>实际产量(公斤/亩)</th>
				<th>年</th>
				<th>月</th>
				<th>拍照平均值</th>
<!-- 				<th>当前载畜量</th>
				<th>系统载畜量</th> -->
				<th>系统草量</th>
				<th>当前草量</th>
				<th>用户类型</th>
				<th>审核</th>
				<shiro:hasPermission name="analysis:grassAnalysis:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="grassAnalysis">
			<tr>
				<td>
					${grassAnalysis.grass.name}
				</td>
				<td>
					${grassAnalysis.standVal}
				</td>
				<td>
					${grassAnalysis.nowStandVal}
				</td>
				<td>
					${grassAnalysis.year}
				</td>
				<td>
					${grassAnalysis.month}
				</td>
				<td>
					${grassAnalysis.avgVal}
				</td>
<%-- 				<td>
					${grassAnalysis.nowCarryingLivestock}
				</td>
				<td>
					${grassAnalysis.carryingLivestock}
				</td> --%>
				<td>
					${grassAnalysis.carryingGrass}
				</td>
				<td>
					${grassAnalysis.nowCarryingGrass}
				</td>
				<td>${userinfo.userType}${fns:getDictLabel(grassAnalysis.userinfo.userType, 'user_type', '无')}</td>
				<td>
				<c:if test="${grassAnalysis.isExam == '2' }">
					审核通过
				</c:if>
				<c:if test="${grassAnalysis.isExam == '1'}">
					审核未通过
				</c:if>
				
				<c:if test="${grassAnalysis.isExam != '2' and grassAnalysis.isExam != '1'}">
					未审核
				</c:if>
				</td>
				<shiro:hasPermission name="analysis:grassAnalysis:edit"><td>
<%--     				<a href="${ctx}/analysis/grassAnalysis/form?id=${grassAnalysis.id}">修改</a>
					<a href="${ctx}/analysis/grassAnalysis/delete?id=${grassAnalysis.id}" onclick="return confirmx('确认要删除该草地分析吗？', this.href)">删除</a> --%>
					
					<c:if test="${grassAnalysis.isExam != '2' and grassAnalysis.isExam != '1'}">
						<a href="${ctx}/analysis/grassAnalysis/Examine?id=${grassAnalysis.id}">审核</a> 
					</c:if>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>